
// This will be instructions.h

int executeOperation(double opcode, double instruction)
{
    
    switch (int(opcode))
    {
        case 3:
        case 4: 
        case 7:
        case 8:
        case 10:
        case 11:
        case 12:
        case 13:
        case 14:
           // instr_addi addi = instruction;
            //r[addi.destination] = r[addi.source] + addi.signedImmediate;
        break;
        case 15:
        case 16:
        case 17:
        case 18:
        case 19:
        case 20:
        case 21:
        case 23:
        case 24:
        case 25:
        case 26:
        case 27:
        case 28:
        case 29:
        case 31:
        case 32:
        case 33:
        case 34:
        case 35:
        case 36:
        case 37:
        case 38:
        case 39:
        case 40:
        case 41:
        case 42:
        case 43:
        case 44:
        case 45:
        case 46:
        case 47: 
        default:
             exit(1);
        break;
    }
    return 0;
}

//Need to make a union.
struct instr_addi {
  unsigned int opcode:6;
  unsigned int destination:5;
  unsigned int source:5;
  unsigned int signedImmediate:16;
};

